/*
 * LocalConnectionHandler.h
 *
 *  Created on: Apr 10, 2011
 *      Author: sms103
 */

#ifndef LOCALCONNECTIONHANDLER_H_
#define LOCALCONNECTIONHANDLER_H_

#include <string>
#include <cstdlib>
#include <sstream>
#include <iostream>
#include "SFTPClient.h"
#include "../networklib/TCPSocket.h"

#define RECV_BUF_SIZE 10000

using namespace std;

class LocalConnectionHandler {
public:
	LocalConnectionHandler(SFTPClient *client, TCPSocket *sock);

	//waits for and replies to commands through this connection until it is closed,
	//then returns
	void handleConnection();

	void sendBadMessageReply();
	virtual ~LocalConnectionHandler();

private:
	SFTPClient *sftpClient;
	TCPSocket *socket;
};

#endif /* LOCALCONNECTIONHANDLER_H_ */
